

function $(id) {
	return !id ? null : document.getElementById(id);
}

function chkvalue(txt) {
	var tip_obj = document.getElementById("tip_"+txt.id);
    if(txt.value == "") {	
		tip_obj.style.display = "block";
		return false;
	} else {
		tip_obj.style.display = "none";
		return true;
	}
}

function IsDigit(){
	return ((event.keyCode >= 48 && event.keyCode <= 57) || (event.keyCode == 13));
}

var checked = false;
//全选/取消
function checkAll(checkBoxName){

	var oc = document.getElementsByName(checkBoxName);
	checked = !checked;
	for(var i=0; i<oc.length; i++) {
		if(checked){
			oc[i].checked=true;	
		}else{
			oc[i].checked=false;	
		}
	}
}